/**
 * 
 */
package com.jeecms.wicool.manager.question.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.jeecms.common.hibernate3.Updater;
import com.jeecms.common.page.Pagination;
import com.jeecms.wicool.dao.question.QuestionOptionDao;
import com.jeecms.wicool.entity.question.QuestionOption;
import com.jeecms.wicool.manager.question.QuestionOptionMng;

/**
 * @author spring
 *
 */
public class QuestionOptionMngImpl implements QuestionOptionMng {

	@Autowired
	private QuestionOptionDao questionOptionDao;

	@Override
	public Pagination getPage(String questionId, String title, int pageNo,
			int pageSize) {
		return questionOptionDao.getPage(questionId, title, pageNo, pageSize);
	}

	@Override
	public QuestionOption findById(Integer id) {
		return questionOptionDao.findById(id);
	}

	@Override
	public QuestionOption save(QuestionOption bean) {
		return questionOptionDao.save(bean);
	}

	@Override
	public QuestionOption deleteById(Integer id) {
		return questionOptionDao.deleteById(id);
	}

	@Override
	public List<QuestionOption> deleteByIds(Integer[] ids) {
		return questionOptionDao.deleteByIds(ids);
	}

	@Override
	public QuestionOption update(QuestionOption obj) {
		 Updater<QuestionOption> updater = new Updater<QuestionOption>(obj);
		 obj = questionOptionDao.updateByUpdater(updater);
        return obj;
	}
}
